﻿#region
/* ===============================================
 * 作者：guopeng           时间：2012/2/4 10:15:25
 * 
 * 
 * 类描述：基础用户实体。只包含账户名和密码
 * 
 * 
 * =============================================== */
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace Jobs.Inf.Entity
{
    [Table("Member")]
    public class Member
    {
        [Column("UserName",TypeName="varchar")]
        [StringLength(200)]
        [Key]
        public string UserName { get; set; }

        [Column("Password",TypeName="varchar")]
        [StringLength(200)]
        [Required]
        public string Password { get; set; }

        /// <summary>
        /// 昵称，非必须
        /// </summary>
        [Column("NickName",TypeName="nvarchar")]
        [StringLength(200)]
        public string NickName { get; set; }

        /// <summary>
        /// 是否已经激活
        /// </summary>
        [Column("IsActivate",TypeName="bit")]
        [Required]
        public bool IsActivate { get; set; }

        /// <summary>
        /// Sha1加密的Guid标示
        /// </summary>
        [Column("Token",TypeName="varchar")]
        [StringLength(200)]
        [Required]
        public string Token { get; set; }

        /// <summary>
        /// Token值的生成时间
        /// </summary>
        [Column("TokenDate",TypeName="datetime")]
        [Required]
        public DateTime TokenDate { get; set; }
    }
}
